<template>
  <div>
    <el-submenu :index="'' + i" v-for="(item, i) in menu" :key="i">
      <template slot="title"
        ><i class="el-icon-message"></i>{{ item.submenuTitle }}</template
      >
      <SubmenuItem :submenuItemTitle="item.submenuItemTitle"></SubmenuItem>
    </el-submenu>
  </div>
</template>

<script>
import SubmenuItem from './SubmenuItem'

export default {
  components: {
    SubmenuItem,
  },
  inject: ['menu']
}
</script>

<style  scoped>
</style>